<!--#include file="..\RootContent.inc"-->
<!--#include file="..\CheckSession.inc"-->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="GENERATOR" content="Microsoft FrontPage 5.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<Title>Selab Net Office</title>
</head>
<%
bID=Request("bID")
bchon=Request("bchon")
sSQL="select * from vtden where ID = '"& bID &"'"
	Set RecVTDEN=server.CreateObject("ADODB.Recordset")
	RecVTDEN.CursorType=3
	RecVTDEN.CacheSize=5
	RecVTDEN.Open sSQL,Conn
	if RecVTDEN.recordcount > 0 then
		bngayden=RecVTDEN("ngaynhan")
		bsokyhieu=RecVTDEN("sogoc")
		bykienxuly=RecVTDEN("ykienxuly")
	end if
	RecVTDEN.close
	set RecVTDEN=nothing
%>
<script language=VBScript runat=server>
	Function FormatDate(vDate)
	   If Not IsNull(vDate) Then
	        vM = Right("0" & Month(vDate), 2)
	        vD = Right("0" & Day(vDate), 2)
	        vY = Right("19" & Year(vDate), 4)
	        FormatDate = vD & "/" & vM & "/" & vY
	   End If
	End Function
	Function SaveDate(vDate)
		dim bvitri1
		dim bvitri2
	   vDate=trim(cstr(vDate))
	   bvitri1=instr(1,vDate,"/")
	   bMonth=left(vDate,bvitri1-1)
	   bvitri2=instr(bvitri1+1,vDate,"/")
	   Dim Temp
	   Temp=right(vDate,len(vDate)-bvitri1)
	   bDay=left(Temp,bvitri2-bvitri1-1)
	   bYear=right(vDate,len(vDate)-bvitri2)
       SaveDate=bDay+"/"+bMonth+"/"+bYear
	End Function
</script>
<Body>
<%if bchon="all" then%>
<table border="1" cellpadding="1" cellspacing="0" style="border-collapse: collapse" bordercolor="#008000" width="100%">
	<tr>
		<td bgcolor="#000080" colspan="5" align="center" width="100%"><b>
		<font size="2" face="Arial" color="#FFFFFF">THÔNG TIN XỬ LÝ VĂN BẢN ĐẾN</font></b></td>
	</tr>
	<tr>
		<td align="center" width="20%"><b>Số, ký hiệu</b></td>
		<td align="left" width="30%" colspan="2">&nbsp;&nbsp;&nbsp;<b><font size="2" face="Arial" color="blue"><%=bsokyhieu%></td>
		<td align="center" width="20%"><b>Ngày đến</b></td>
		<td align="left" width="30%">&nbsp;&nbsp;&nbsp;<b><font size="2" face="Arial" color="blue"><%=FormatDate(bngayden)%></font></b></td>
	</tr>
	<tr>
		<td align="center" width="20%"><b>Ý kiến lãnh đạo</b></td>
		<td align="left" width="80%" colspan="4"><b><font size="2" face="Arial" color="blue"><%=bykienxuly%></font></b></td>
	</tr>
	<tr>
		<td align="center" width="20%"><b>Đơn vị xử lý</b></td>
		<td align="center" width="15%"><b>Ngày bắt đầu</b></td>
		<td align="center" width="15%"><b>Hạn xử lý</b></td>
		<td align="center" width="20%"><b>Ngày hoàn thành</b></td>
		<td align="center" width="30%"><b>Kết quả xử lý</b></td>
	</tr>
	<%
	sSQL="select ykxl_hxl.*,donvi.tendonvi,hoanthanhxl.ngayhtxl,hoanthanhxl.kqxl from ykxl_hxl inner join donvi on ykxl_hxl.madonvi=donvi.madonvi inner join hoanthanhxl on ykxl_hxl.idvtden=hoanthanhxl.idvtden and ykxl_hxl.madonvi=hoanthanhxl.madonvi where ykxl_hxl.idvtden like '"& bid &"'"
	Set RecHXL=server.CreateObject("ADODB.Recordset")
	RecHXL.CursorType=3
	RecHXL.CacheSize=5
	RecHXL.Open sSQL,Conn
	do while Not RecHXL.EOF
	%>
	<tr>
		<td align="left" width="20%">&nbsp;&nbsp;<b><font size="2" face="Arial" color="blue"><%=RecHXL("tendonvi")%></font></b></td>
		<td align="center" width="15%"><b><font size="2" face="Arial" color="blue"><%=FormatDate(RecHXL("nbdxuly"))%></font></b></td>
		<td align="center" width="15%"><b><font size="2" face="Arial" color="blue"><%=FormatDate(RecHXL("hanxuly"))%></font></b></td>
		<td align="center" width="20%"><b><font size="2" face="Arial" color="blue"><%=FormatDate(RecHXL("ngayhtxl"))%></font></b></td>
		<td align="left" width="30%"><%=RecHXL("kqxl")%></td>
	</tr>
	<%
		RecHXL.MoveNext
	loop
	RecHXL.close
	set RecHXL=nothing
	%>
</table>
<%else%>
<table border="1" cellpadding="1" cellspacing="0" style="border-collapse: collapse" bordercolor="#008000" width="100%">
	<tr>
		<td bgcolor="#000080" colspan="6" align="center" width="100%"><b>
		<font size="2" face="Arial" color="#FFFFFF">THÔNG TIN XỬ LÝ VĂN BẢN ĐẾN</font></b></td>
	</tr>
	<tr>
		<td align="left" width="16%"><b>Số, ký hiệu</b></td>
		<td align="left" width="50%" colspan="3">&nbsp;&nbsp;&nbsp;<b><font size="2" face="Arial" color="blue"><%=bsokyhieu%></td>
		<td align="center" width="17%"><b>Ngày đến</b></td>
		<td align="left" width="17%">&nbsp;&nbsp;&nbsp;<b><font size="2" face="Arial" color="blue"><%=FormatDate(bngayden)%></font></b></td>
	</tr>
	<tr>
		<td align="left" width="16%"><b>Ý kiến lãnh đạo</b></td>
		<td align="left" width="84%" colspan="5"><b><font size="2" face="Arial" color="blue"><%=bykienxuly%></font></b></td>
	</tr>
	<%
	sSQL="select ykxl_hxl.*,donvi.tendonvi,hoanthanhxl.ngayhtxl,hoanthanhxl.kqxl from ykxl_hxl inner join donvi on ykxl_hxl.madonvi=donvi.madonvi left outer join hoanthanhxl on ykxl_hxl.idvtden=hoanthanhxl.idvtden and ykxl_hxl.madonvi=hoanthanhxl.madonvi where ykxl_hxl.idvtden like '"& bid &"' and ykxl_hxl.madonvi='"& Session("bMaDonVi") &"'"
	Set RecHXL=server.CreateObject("ADODB.Recordset")
	RecHXL.CursorType=3
	RecHXL.CacheSize=5
	RecHXL.Open sSQL,Conn
	if RecHXL.recordcount then
	%>
	<tr>
		<td align="left" width="16%"><b>Ngày bắt đầu</b></td>
		<td align="center" width="16%"><b><font size="2" face="Arial" color="blue"><%=FormatDate(RecHXL("nbdxuly"))%></font></b></td>
		<td align="center" width="17%"><b>Hạn xử lý</b></td>
		<td align="center" width="17%"><b><font size="2" face="Arial" color="blue"><%=FormatDate(RecHXL("hanxuly"))%></font></b></td>
		<td align="center" width="17%"><b>Ngày hoàn thành</b></td>
		<td align="center" width="17%"><b><font size="2" face="Arial" color="blue"><%=FormatDate(RecHXL("ngayhtxl"))%></font></b></td>
	</tr>
		<td align="left" width="16%"><b>Kết quả xử lý</b></td>
		<td align="left" width="84%" colspan="5"><b><font size="2" face="Arial" color="blue"><%=RecHXL("kqxl")%></font></b></td>
	</tr>
	<%
	end if
	RecHXL.close
	set RecHXL=nothing
	%>
</table>
<%end if%>
</body>
</html>